﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public static class Commands
    {
        static Dictionary<string, Command> dict = new Dictionary<string, Command>();
        static Commands()
        {
            dict.Add("传送", new Command { Name = "传送", Data = new byte[] { 0x00, 0x01, 0x8B, 0x5A } });
            //dict.Add("进入地图", new Command { Name = "进入地图", Data = new byte[] { 0x00, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x8B, 0x57, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x03, 0xEA } });
            //dict.Add("进入地图", new Command { Name = "进入地图", Data = new byte[] { 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0x8B, 0x57, 0x80, 0x1E, 0xD4, 0x0F } });
            dict.Add("进入地图", new Command { Name = "进入地图", Data = new byte[] { 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0x8B, 0x57, 0xc0, 0x16, 0x80, 0x0d } });
            dict.Add("换线", new Command { Name = "换线", Data = new byte[] { 0x00, 0x01, 0x8B, 0x5C } });
            dict.Add("复活", new Command { Name = "复活", Data = new byte[] { 0x00, 0x01, 0x8B, 0x57, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x03, 0xEA } });
            dict.Add("签到", new Command { Name = "签到", Data = new byte[] { 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x52, 0x8E } });
        }
        public static Command GetCommand(string name)
        {
            return dict[name];
        }
    }
}
